#ifndef __ALU_DEF_H__
#define __ALU_DEF_H__

// INT operations

// ALU defines

#define NOP_OPCODE -1
#define NOP_DELAY 0

#define IADD_OPCODE 0
#define IADD_DELAY 2

#define ISUB_OPCODE 1
#define ISUB_DELAY 2

#define IABD_OPCODE 2
#define IABD_DELAY 2

#define UABD_OPCODE 3
#define UABD_DELAY 2

#define ILT_OPCODE 4
#define ILT_DELAY 2

#define ULT_OPCODE 5
#define ULT_DELAY 2

#define ILE_OPCODE 6
#define ILE_DELAY 2

#define ULE_OPCODE 7
#define ULE_DELAY 2

#define IEQ_OPCODE 8
#define IEQ_DELAY 1

#define NEQ_OPCODE 9
#define NEQ_DELAY 1

#define AND_OPCODE 10
#define AND_DELAY 1

#define OR_OPCODE 11
#define OR_DELAY 1

#define XOR_OPCODE 12
#define XOR_DELAY 1

#define NOT_OPCODE 13
#define NOT_DELAY 1

#define IADDS_OPCODE 14
#define IADDS_DELAY 2

#define UADDS_OPCODE 15
#define UADDS_DELAY 2

#define ISUBS_OPCODE 16
#define ISUBS_DELAY 2

#define USUBS_OPCODE 17
#define USUBS_DELAY 2

#define SHIFT_OPCODE 18
#define SHIFT_DELAY 1

#define SHIFTA_OPCODE 19
#define SHIFTA_DELAY 1

#define ROTATE_OPCODE 20
#define ROTATE_DELAY 1

//MUL
#define IMUL_OPCODE 21
#define IMUL_DELAY 4

#define UMUL_OPCODE 22
#define UMUL_DELAY 4

#define IMULR_OPCODE 23
#define IMULR_DELAY 4

#define UMULR_OPCODE 24
#define UMULR_DELAY 4

#define IMULD_OPCODE 25
#define IMULD_DELAY 4

#define UMULD_OPCODE 26
#define UMULD_DELAY 1

//DSQ
#define IDIV_OPCODE 27
#define IDIV_DELAY 22

#define UDIV_OPCODE 28
#define UDIV_DELAY 22

#define IDIVR_OPCODE 29
#define IDIVR_DELAY 23

#define UDIVR_OPCODE 30
#define UDIVR_DELAY 24


// FLOAT operations

// ADD ALU
#define FADD_OPCODE 31
#define FADD_DELAY 4

#define FSUB_OPCODE 32
#define FSUB_DELAY 4

#define FABS_OPCODE 33
#define FABS_DELAY 1

#define FLT_OPCODE 34
#define FLT_DELAY 2

#define FLE_OPCODE 35
#define FLE_DELAY 2

#define FTOI_OPCODE 36
#define FTOI_DELAY 3

#define FFRAC_OPCODE 37
#define FFRAC_DELAY 4

#define ITOF_OPCODE 38
#define ITOF_DELAY 4

// MUL ALU
#define FMUL_OPCODE 39
#define FMUL_DELAY 4

// DSQ ALU
#define FDIV_OPCODE 40
#define FDIV_DELAY 17

#define FSQRT_OPCODE 41
#define FSQRT_DELAY 16

// STREAM INTERFACE
#define DATA_IN_OPCODE 42
#define DATA_IN_DELAY 1

#define DATA_OUT_OPCODE 43
#define DATA_OUT_DELAY 1

// Jump/Branch
#define BNE_OPCODE 44
#define BNE_DELAY 1

#define BEQ_OPCODE 45
#define BEQ_DELAY 1

#define J_OPCODE 46
#define J_DELAY 1

// Homespun Opcode for immediate values
#define LI_OPCODE 47
#define LI_DELAY 1

#endif /* ifndef __ALU_DEF_H__ */